package com.tz.dao;

import com.tz.entity.Product;
import org.hibernate.criterion.DetachedCriteria;

import java.util.List;

/**
 * Created by Administrator on 16-7-28.
 */
public interface ProductDao {

    /**
     * 根据 DetachedCriteria 查询
     *
     * @param dc         DetachedCriteria
     * @param maxResults 最大记录数
     * @return List<Product>
     */
    List<Product> findByDetachedCriteria(DetachedCriteria dc, int maxResults);

    /**
     * 新增
     */
    void save(Product product);
}
